<?php if(!empty($doanviens) && !empty($quyens)){?>
<table id='tables'>
<tr>
<th>STT</th>
<th>Họ tên</th>
<th>Chức vụ</th>
<?php foreach ($quyens as $quyen_id=>$quyenval):?>
<th><?php echo $quyenval;?></th>
<?php endforeach;?>
</tr>
<?php if(!empty($doanviens)){?>
<?php $i=1;?>
<?php foreach ($doanviens as $doanvien):?>
<tr>
<td><?php echo $i;?></td>
<td><?php echo $doanvien[$tenloaidv]['name'];?></td>
<td><?php echo $chucvus[$doanvien[$tenloaidv][$maso]];?></td>
<?php foreach ($quyens as $quyen_id=>$quyenval):?>
<td><?php if(isset($quyendvs[$doanvien[$tenloaidv][$maso]]))
		{
			if(in_array($quyenval, $quyendvs[$doanvien[$tenloaidv][$maso]]))
				echo $html->image($this->webroot.'../img/check.png');				
		}
		?>
</td>
<?php endforeach;?>
</tr>
<?php $i+=1;?>
<?php endforeach;?>
<?php }?>
</table>
<?php }?>